import { Status } from '@/constants/enums/pointGood'
import request from "@/utils/request"

export async function queryList(params: PointGood.QueryListParams) {
  return request<PointGood.Entity[]>('/app/manager/score/good/list', {
    data: params,
  })
}

export async function savePointGood(params: Partial<PointGood.Entity>) {
  return request<boolean>('/app/manager/score/good/addOrUp', {
    data: params,
  })
}

export async function editPointGoodStatus(params: {id: string, status: Status | 3}) {
  return request<boolean>('/app/manager/score/good/status', {
    data: params,
  })
}

export async function queryExchangeList(params: PointGood.QueryExchangeListParams) {
  return request<PointGood.Exchange[]>('/app/manager/score/good/get/list', {
    data: params,
  })
}
